package com.qinggeng.project.system.service.impl;

import com.qinggeng.project.api.dto.ShareDto;
import com.qinggeng.project.system.domain.Share;
import com.qinggeng.project.system.mapper.ShareMapper;
import com.qinggeng.project.system.service.IShareService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ShareServiceImpl implements IShareService {

    @Resource
    private ShareMapper shareMapper;

    @Override
    public int insertShare(Share share) {
        return shareMapper.insertShare(share);
    }

    @Override
    public int deleteShareByIds(Long[] ids) {
        return shareMapper.deleteShareByIds(ids);
    }

    @Override
    public int updateShare(Share share) {
        return shareMapper.updateShare(share);
    }

    @Override
    public ShareDto selectShareDtoById(Long id) {
        return shareMapper.selectShareDtoById(id);
    }

    @Override
    public ShareDto selectShareDtoByType(String type) {
        return shareMapper.selectShareDtoByType(type);
    }
}
